Implementation of LowPass, HighPass, and XCorr Table Functions - #18539
Merged
JackieTien97 merged 5 commits intoSep 2, 2026
Merged
Conversation
JackieTien97
requested changes
Sep 1, 2026
JackieTien97
left a comment
Contributor
There was a problem hiding this comment.
Requesting changes because this PR currently fails both the mandatory license check and its newly added integration-test suite, and because XCorr omits the lag key while accepting an input size that makes the synchronous O(n^2) implementation execute 4.29 billion pair iterations. I reproduced the verification failures on head b94bc61: RAT fails on XCorrTableFunction.java; TableSimpleIT and TableClusterIT each run 39 tests with 1 failure. The remaining inline comments cover anonymous fields, floating-point test stability, and i18n compliance.
JackieTien97
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LowPass and HighPass
The LowPass and HighPass functions accept the following parameters:
For each calculation column, the function collects the complete sequence of finite, non-null values and applies an FFT-based transformation:
The inverse FFT is then applied to obtain the transformed sequence. The output contains the partition columns, the original time column, and one DOUBLE result column for each calculation column. Null, NaN, and infinite input values are not included in the FFT calculation.
XCorr
The XCorr function accepts:
The two calculation columns are treated as two aligned sequences. The function calculates their cross-correlation for all lags from -(n - 1) to n - 1, where n is the number of rows in the partition.
For each lag, only pairs in which both values are finite and non-null participate in the calculation. The correlation value is normalized by the number of valid pairs for that lag. If a lag has no valid pairs, the corresponding result is returned as null.
The output contains the partition columns and one DOUBLE result column named according to the two calculation columns, for example xcorr(s1, s2). The original time column is used for ordering but is not included in the result.